/**
 * @name: api封装
 * @date: 2020.4.1
 */
import Vue from 'vue'
import uView from "uview-ui";
Vue.use(uView);

var domain = '';
if(process.env.NODE_ENV === 'development') {
    // domain = '://192.168.1.108';
    // domain = '://192.168.1.4:8080';
    domain = '://60.173.195.243:9998'; 
	// domain = 's://app.etubang.com';      
} else {
    domain = 's://app.etubang.com';
}
 
const base = 'http' + domain + '/etubang/api/';  
const socket = 'ws' + domain + '/etubang/';

const api = {
	socketUrl: socket + 'testHandler',  //webSocket
	factoryUrl: base + 'factory/',  //工厂模式
	userUrl: base + 'user/'  ,//用户
	siteUrl: base + 'site/',  //加注机/加注站
}

Vue.prototype.$api = api;
